<template>
  <div class="prospectus-navs">
    <ul>
      <li :class="{ 'current-action': step === 0}" @click="back(0)">选择户型</li>
      <li>
        <ArrowRight />
      </li>
      <li :class="{ 'current-action': step === 1}" @click="back(1)">确定房屋信息</li>
      <li>
        <ArrowRight />
      </li>
      <li :class="{ 'current-action': step === 2}" @click="back(2)">付款信息</li>
    </ul>
  </div>
</template>
<script>
import ArrowRight from "@/components/ArrowRight";
export default {
  components: { ArrowRight },
  props: {
    step: {
      type: Number,
      default: 0
    }
  },
  methods: {
    back(index) {
      if (index < this.step) {
        this.$router.go(index - this.step);
      }
    }
  }
};
</script>
<style lang="stylus">
.prospectus-navs ul {
  list-style: none;
  margin: 0;
  padding: 60px 0 0 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: white;

  li {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 138px;
    line-height: 138px;
    font-size: 60px;
    text-decoration: none;
    color: #000;
    padding: 0 40px;
    position: relative;

    &.current-action {
      color: #045FE5;
    }
  }
}
</style>